* All disasters 
* Table 1, Model 1 (contemporaneous)
logit negmntyn reb_dis_yn gov_dis_yn both_dis_yn pstnegatt v2x_polyarchy lnrgdppc lnpop lnrugged ethfrac coldwar rebstrength2 time time2 time3, cluster(dyad_id)

outreg2 using "path", bdec(3) adec(2) alpha(.01, .05, .1) sortvar (reb_dis_yn gov_dis_yn both_dis_yn rebdis2mn govdis2mn bothdis2mn rebdis3mn govdis3mn bothdis3mn rebdis4mn govdis4mn bothdis4mn rebdis5mn govdis5mn bothdis5mn) addstat(Wald Chi2, e(chi2), Prob > Chi2, e(p), Log likelihood, e(ll), number of clusters, e(N_clust)) replace ctitle(Model 1)

* Table 2, Model 1
sum negmntyn reb_dis_yn gov_dis_yn both_dis_yn v2x_polyarchy lnrgdppc lnpop lnrugged ethfrac coldwar rebstrength2 if e(sample)==1, d
margins, atmeans
margins, at(coldwar = (0 1)) atmeans
margins, at(rebstrength2 = (-1.401529 -0.8106698)) atmeans

* Table 1, Model 2 (contemporaneous + 1 following month) 
logit negmntyn rebdis2mn govdis2mn bothdis2mn pstnegatt v2x_polyarchy lnrgdppc lnpop lnrugged ethfrac coldwar rebstrength2 time time2 time3, cluster(dyad_id)

outreg2 using "path", bdec(3) adec(2) alpha(.01, .05, .1) sortvar (reb_dis_yn gov_dis_yn both_dis_yn rebdis2mn govdis2mn bothdis2mn rebdis3mn govdis3mn bothdis3mn rebdis4mn govdis4mn bothdis4mn rebdis5mn govdis5mn bothdis5mn) addstat(Wald Chi2, e(chi2), Prob > Chi2, e(p), Log likelihood, e(ll), number of clusters, e(N_clust)) append ctitle(Model 2)

* Table 2, Model 2
sum negmntyn rebdis2mn govdis2mn bothdis2mn v2x_polyarchy lnrgdppc lnpop lnrugged ethfrac coldwar rebstrength2 if e(sample)==1, d
margins, atmeans
margins, at(rebdis2mn = (0 1)) atmeans
margins, at(bothdis2mn = (0 1)) atmeans
margins, at(coldwar = (0 1)) atmeans
margins, at(rebstrength2 = (-1.487596 -0.9287903)) atmeans

* Table 1, Model 3 (contemporaneous + 2 following months) 
logit negmntyn rebdis3mn govdis3mn bothdis3mn pstnegatt v2x_polyarchy lnrgdppc lnpop lnrugged ethfrac coldwar rebstrength2 time time2 time3, cluster(dyad_id)

outreg2 using "path", bdec(3) adec(2) alpha(.01, .05, .1) sortvar (reb_dis_yn gov_dis_yn both_dis_yn rebdis2mn govdis2mn bothdis2mn rebdis3mn govdis3mn bothdis3mn rebdis4mn govdis4mn bothdis4mn rebdis5mn govdis5mn bothdis5mn) addstat(Wald Chi2, e(chi2), Prob > Chi2, e(p), Log likelihood, e(ll), number of clusters, e(N_clust)) append ctitle(Model 3)

* Table 2, Model 3
sum negmntyn rebdis3mn govdis3mn bothdis3mn v2x_polyarchy lnrgdppc lnpop lnrugged ethfrac coldwar rebstrength2 if e(sample)==1, d
margins, atmeans
margins, at(bothdis3mn = (0 1)) atmeans
margins, at(coldwar = (0 1)) atmeans
margins, at(rebstrength2 = (-1.487596 -0.9287903)) atmeans

* Table 1, Model 4 (contemporaneous + 3 following months)  
logit negmntyn rebdis4mn govdis4mn bothdis4mn pstnegatt v2x_polyarchy lnrgdppc lnpop lnrugged ethfrac coldwar rebstrength2 time time2 time3, cluster(dyad_id)

outreg2 using "path", bdec(3) adec(2) alpha(.01, .05, .1) sortvar (reb_dis_yn gov_dis_yn both_dis_yn rebdis2mn govdis2mn bothdis2mn rebdis3mn govdis3mn bothdis3mn rebdis4mn govdis4mn bothdis4mn rebdis5mn govdis5mn bothdis5mn) addstat(Wald Chi2, e(chi2), Prob > Chi2, e(p), Log likelihood, e(ll), number of clusters, e(N_clust)) append ctitle(Model 4)

* Table 2, Model 4
sum negmntyn rebdis4mn govdis4mn bothdis4mn v2x_polyarchy lnrgdppc lnpop lnrugged ethfrac coldwar rebstrength2 if e(sample)==1, d
margins, atmeans
margins, at(rebdis4mn = (0 1)) atmeans
margins, at(bothdis4mn = (0 1)) atmeans
margins, at(coldwar = (0 1)) atmeans
margins, at(rebstrength2 = (-1.487596 -0.9287903)) atmeans

* Table 1, Model 5 (contemporaneous + 4 following months)  
logit negmntyn rebdis5mn govdis5mn bothdis5mn pstnegatt v2x_polyarchy lnrgdppc lnpop lnrugged ethfrac coldwar rebstrength2 time time2 time3, cluster(dyad_id)

outreg2 using "path", bdec(3) adec(2) alpha(.01, .05, .1) sortvar (reb_dis_yn gov_dis_yn both_dis_yn rebdis2mn govdis2mn bothdis2mn rebdis3mn govdis3mn bothdis3mn rebdis4mn govdis4mn bothdis4mn rebdis5mn govdis5mn bothdis5mn) addstat(Wald Chi2, e(chi2), Prob > Chi2, e(p), Log likelihood, e(ll), number of clusters, e(N_clust)) append ctitle(Model 5)

* Table 2, Model 5
sum negmntyn rebdis5mn govdis5mn bothdis5mn v2x_polyarchy lnrgdppc lnpop lnrugged ethfrac coldwar rebstrength2 if e(sample)==1, d

margins, atmeans
margins, at(bothdis5mn = (0 1)) atmeans
margins, at(rebstrength2 = (-1.487596 -0.9287903)) atmeans



* rapid onset disasters
sort dyad_id date

* Table 3, Model 1 (contemporaneous)
logit negmntyn reb_disr_yn gov_disr_yn both_disr_yn pstnegatt v2x_polyarchy lnrgdppc lnpop lnrugged ethfrac coldwar rebstrength2 time time2 time3, cluster(dyad_id)

outreg2 using "path", bdec(3) adec(2) alpha(.01, .05, .1) sortvar (reb_disr_yn gov_disr_yn both_disr_yn rebdisr2mn govdisr2mn bothdisr2mn rebdisr3mn govdisr3mn bothdisr3mn rebdisr4mn govdisr4mn bothdisr4mn rebdisr5mn govdisr5mn bothdisr5mn) addstat(Wald Chi2, e(chi2), Prob > Chi2, e(p), Log likelihood, e(ll), number of clusters, e(N_clust)) replace ctitle(Model 1)

sum negmntyn reb_disr_yn gov_disr_yn both_disr_yn pstnegatt v2x_polyarchy lnrgdppc lnpop lnrugged ethfrac coldwar rebstrength2 if e(sample)==1, d

margins, atmeans
margins, at(coldwar = (0 1)) atmeans
margins, at(rebstrength2 = (-1.487596 -0.9287903)) atmeans

* Table 3, Model 2 (contemporaneous + 1 following month)
logit negmntyn rebdisr2mn govdisr2mn bothdisr2mn pstnegatt v2x_polyarchy lnrgdppc lnpop lnrugged ethfrac coldwar rebstrength2 time time2 time3, cluster(dyad_id)

outreg2 using "path", bdec(3) adec(2) alpha(.01, .05, .1) sortvar (reb_disr_yn gov_disr_yn both_disr_yn rebdisr2mn govdisr2mn bothdisr2mn rebdisr3mn govdisr3mn bothdisr3mn rebdisr4mn govdisr4mn bothdisr4mn rebdisr5mn govdisr5mn bothdisr5mn) addstat(Wald Chi2, e(chi2), Prob > Chi2, e(p), Log likelihood, e(ll), number of clusters, e(N_clust)) append ctitle(Model 2)

sum negmntyn rebdisr2mn govdisr2mn bothdisr2mn pstnegatt v2x_polyarchy lnrgdppc lnpop lnrugged ethfrac coldwar rebstrength2 if e(sample)==1, d

margins, atmeans
margins, at(rebdisr2mn = (0 1)) atmeans
margins, at(coldwar = (0 1)) atmeans
margins, at(rebstrength2 = (-1.487596 -0.9287903)) atmeans

* Table 3, Model 3 (contemporaneous + 2 following months) 
logit negmntyn rebdisr3mn govdisr3mn bothdisr3mn pstnegatt v2x_polyarchy lnrgdppc lnpop lnrugged ethfrac coldwar rebstrength2 time time2 time3, cluster(dyad_id)

outreg2 using "path", bdec(3) adec(2) alpha(.01, .05, .1) sortvar (reb_disr_yn gov_disr_yn both_disr_yn rebdisr2mn govdisr2mn bothdisr2mn rebdisr3mn govdisr3mn bothdisr3mn rebdisr4mn govdisr4mn bothdisr4mn rebdisr5mn govdisr5mn bothdisr5mn) addstat(Wald Chi2, e(chi2), Prob > Chi2, e(p), Log likelihood, e(ll), number of clusters, e(N_clust)) append ctitle(Model 3)

sum negmntyn rebdisr2mn govdisr2mn bothdisr2mn pstnegatt v2x_polyarchy lnrgdppc lnpop lnrugged ethfrac coldwar rebstrength2 if e(sample)==1, d

margins, atmeans
margins, at(bothdisr3mn = (0 1)) atmeans
margins, at(coldwar = (0 1)) atmeans
margins, at(rebstrength2 = (-1.487596 -0.9287903)) atmeans

* Table 3, Model 4 (contemporaneous + 3 following months) 
logit negmntyn rebdisr4mn govdisr4mn bothdisr4mn pstnegatt v2x_polyarchy lnrgdppc lnpop lnrugged ethfrac coldwar rebstrength2 time time2 time3, cluster(dyad_id)

outreg2 using "path", bdec(3) adec(2) alpha(.01, .05, .1) sortvar (reb_disr_yn gov_disr_yn both_disr_yn rebdisr2mn govdisr2mn bothdisr2mn rebdisr3mn govdisr3mn bothdisr3mn rebdisr4mn govdisr4mn bothdisr4mn rebdisr5mn govdisr5mn bothdisr5mn) addstat(Wald Chi2, e(chi2), Prob > Chi2, e(p), Log likelihood, e(ll), number of clusters, e(N_clust)) append ctitle(Model 4)

margins, atmeans
margins, at(coldwar = (0 1)) atmeans
margins, at(rebstrength2 = (-1.487596 -0.9287903)) atmeans

* Table 3, Model 5 (contemporaneous + 4 following months) 
logit negmntyn rebdisr5mn govdisr5mn bothdisr5mn pstnegatt v2x_polyarchy lnrgdppc lnpop lnrugged ethfrac coldwar rebstrength2 time time2 time3, cluster(dyad_id)

outreg2 using "path", bdec(3) adec(2) alpha(.01, .05, .1) sortvar (reb_disr_yn gov_disr_yn both_disr_yn rebdisr2mn govdisr2mn bothdisr2mn rebdisr3mn govdisr3mn bothdisr3mn rebdisr4mn govdisr4mn bothdisr4mn rebdisr5mn govdisr5mn bothdisr5mn) addstat(Wald Chi2, e(chi2), Prob > Chi2, e(p), Log likelihood, e(ll), number of clusters, e(N_clust)) append ctitle(Model 5)

margins, atmeans
margins, at(coldwar = (0 1)) atmeans
margins, at(rebstrength2 = (-1.487596 -0.9287903)) atmeans

* APPENDIX

* Table A1
sum reb_dis_yn gov_dis_yn both_dis_yn rebdis2mn govdis2mn bothdis2mn rebdis3mn govdis3mn bothdis3mn rebdis4mn govdis4mn bothdis4mn rebdis5mn govdis5mn bothdis5mn v2x_polyarchy pstnegatt lnrgdppc lnpop lnrugged ethfrac coldwar rebstrength2 

* Table A2
corr reb_dis_yn gov_dis_yn both_dis_yn rebdis2mn govdis2mn bothdis2mn rebdis3mn govdis3mn bothdis3mn rebdis4mn govdis4mn bothdis4mn rebdis5mn govdis5mn bothdis5mn v2x_polyarchy pstnegatt lnrgdppc lnpop lnrugged ethfrac coldwar rebstrength2 